package adminlte.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.security.Principal;

/**
 * @author ZHUFEIFEI
 */
@Controller
public class ViewController {

    @GetMapping("index")
    public String index(Model model, Principal user) {
        model.addAttribute("username", user.getName());
        return "index";
    }

}
